package org.example.teaView;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.net.Socket;

public class HandleFirst implements ActionListener {
    Firstview firstview;
    Socket socket=null;
    DataInputStream in=null;
    DataOutputStream out=null;
    Thread thread;
    public void setFirstview(Firstview firstview) {
        this.firstview = firstview;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == firstview.addTopic){
            firstview.setVisible(false);
            new AddTopicView();

        } else if (e.getSource() == firstview.seeTotal) {
            firstview.setVisible(false);
            new SeeAllTopicView();

        }else if (e.getSource() == firstview.deleteTopic) {
            firstview.setVisible(false);
            new DeleteTopicView();

        }else if (e.getSource() == firstview.changeTopic) {
            firstview.setVisible(false);
            new ChangeTopicView();

        }else if (e.getSource() == firstview.seeStu) {
            firstview.setVisible(false);
            new SeeStuView();

        }
    }
}
